<div class="breadcrumbwidget">
	<ul class="skins">
        <li><a href="default" class="skin-color default"></a></li>
        <li><a href="orange" class="skin-color orange"></a></li>
        <li>&nbsp;</li>
        <li class="fixed"><a href="" class="skin-layout fixed"></a></li>
        <li class="wide"><a href="" class="skin-layout wide"></a></li>
    </ul><!--skins-->
	<ul class="breadcrumb">
        <li><a href="<?php echo $baseurl?>">Trang chủ</a> <span class="divider">/</span></li>
        <li class="active">Quản lý chương trình</li>
    </ul>
</div><!--breadcrumbwidget-->
<div class="pagetitle">
	<h1>Thêm câu hỏi</h1> <span></span>
</div><!--pagetitle-->

<div class="maincontent">
<?php if(validation_errors()): ?>
    <div class="alert alert-error" style="margin: 10px 10px 10px 40px;">
      <button data-dismiss="alert" class="close" type="button">×</button>
      <?php echo validation_errors(); ?>
    </div>
<?php endif;?>
<?php if(!in_array($data, array(null, '', '0'))): ?>
    <div class="alert alert-error" style="margin: 10px 10px 10px 40px;">
      <button data-dismiss="alert" class="close" type="button">×</button>
      <?php if($data == 100): ?>
        <span>Thêm câu hỏi thất bại!</span>
      <?php endif;?>
    </div>
<?php endif;?>
	<div class="contentinner content-dashboard">
    
    <?php $attr = array('class' => 'stdform'); echo form_open('', $attr)?>
    
        <p>
            <label>Chọn chương trình</label>
            <span class="field">
                <?php echo $fview->selectTypeCampaign($campaign, $id, 'campaign', 'selectCampaign()');?>
            </span>
        </p>
        <p>
        	<label>STT</label>
            <span class="field"><input type="text" name="stt" class="input-small" placeholder="Nhập stt" value="<?php echo $this->input->post('stt');?>"/></span>
        </p>
        <p>
        	<label>Nội dung câu hỏi</label>
            <span class="field"><input type="text" name="question" class="input-xlarge" placeholder="Nhập câu hỏi" value="<?php echo $this->input->post('question');?>"/></span>
        </p>
        <p>
        	<label>Phương án 1</label>
            <span class="field"><input type="text" name="choice-1" class="input-xlarge" placeholder="Nhập phương án 1" value="<?php echo $this->input->post('choice-1');?>"/></span>
        </p>
        <p>
        	<label>Phương án 2</label>
            <span class="field"><input type="text" name="choice-2" class="input-xlarge" placeholder="Nhập phương án 2" value="<?php echo $this->input->post('choice-2');?>"/></span>
        </p>
        <p>
        	<label>Phương án 3</label>
            <span class="field"><input type="text" name="choice-3" class="input-xlarge" placeholder="Nhập phương án 3" value="<?php echo $this->input->post('choice-3');?>"/></span>
        </p>
        <p>
        	<label>Phương án 4</label>
            <span class="field"><input type="text" name="choice-4" class="input-xlarge" placeholder="Nhập phương án 4" value="<?php echo $this->input->post('choice-4');?>"/></span>
        </p>
        <p>
        	<label>Đáp án</label>
            <span class="field"><input type="text" name="answer" class="input-xlarge" placeholder="Nhập đáp án" value="<?php echo $this->input->post('answer');?>"/></span>
        </p>
        <p>
            <label></label>
            <button class="btn btn-rounded" type="submit"> <i class="iconfa-ok"></i> &nbsp; Thêm</button>
        </p>
    </form>
    
    </div>
</div>

<script>

function selectCampaign()
{
    var campaign = $("#campaign").val();
    if(campaign != '')
    {
        window.location = $("#baseUrl").val()+'manage/question/add-question/'+campaign;
    }
}

</script>